

/**
 * A pair between two proxies. Broad-phase collision algorithms collect pairs of proxies
 * as linked list of ProxyPair.
 */

import { Proxy } from "./Proxy";

export class ProxyPair {
	_next: ProxyPair;

	_p1: Proxy;
	_p2: Proxy;


	constructor() {
		this._p1 = null;
		this._p2 = null;
	}

	// --- public ---

	/**
	 * Returns the first proxy of the pair.
	 */
	public getProxy1(): Proxy {
		return this._p1;
	}

	/**
	 * Returns the second proxy of the pair.
	 */
	public getProxy2(): Proxy {
		return this._p2;
	}

	/**
	 * Returns the next pair.
	 */
	public getNext(): ProxyPair {
		return this._next;
	}

}
